package ru.jetsoft.reg112.desktop.data;

import java.util.LinkedList;
import java.util.List;

public class Param {

    private int id;
    private String name;
    private int type;
    private boolean required;
    private boolean multiple;
    private String pattern;
    private String defaultValue;
    private String tooltip;
//    private int order;
    private final List<Param> childs = new LinkedList<Param>();

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isRequired() {
        return required;
    }

    public void setRequired(boolean required) {
        this.required = required;
    }

    public boolean isMultiple() {
        return multiple;
    }

    public void setMultiple(boolean multiple) {
        this.multiple = multiple;
    }

    public String getPattern() {
        return pattern;
    }

    public void setPattern(String pattern) {
        this.pattern = pattern;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getTooltip() {
        return tooltip;
    }

    public void setTooltip(String tooltip) {
        this.tooltip = tooltip;
    }

//    public int getOrder() {
//        return order;
//    }
//
//    public void setOrder(int order) {
//        this.order = order;
//    }

    public List<Param> getChilds() {
        return childs;
    }

    public void setChilds(List<Param> childs) {
        this.childs.clear();
        this.childs.addAll(childs);
    }

    public void addChilds(List<Param> childs) {
        this.childs.addAll(childs);
    }

    public void addChild(Param child) {
        this.childs.add(child);
    }
}
